package es.uned.ii.si3.web.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import es.uned.ii.si3.util.UserAgentDetector;

public class LinkAction extends DispatchAction {
	public ActionForward login(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		UserAgentDetector uaDetector = new UserAgentDetector(request);
		return mapping.findForward(uaDetector.composeForward(".login"));
	}

	public ActionForward crear_solicitud(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		UserAgentDetector uaDetector = new UserAgentDetector(request);
		return mapping.findForward(uaDetector.composeForward(".crear_solicitud"));
	}
	
	public ActionForward listar_propuestas(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		UserAgentDetector uaDetector = new UserAgentDetector(request);
		return mapping.findForward(uaDetector.composeForward(".listar_propuestas"));
	}
	
	public ActionForward fitro_academico_propuestas(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		UserAgentDetector uaDetector = new UserAgentDetector(request);
		return mapping.findForward(uaDetector.composeForward(".fitro_academico_propuestas"));
	}

	public ActionForward resultado_envio_solicitud(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		UserAgentDetector uaDetector = new UserAgentDetector(request);
		return mapping.findForward(uaDetector.composeForward(".resultado_envio_solicitud"));
	}
	public ActionForward formulario_registro_usuarios(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		UserAgentDetector uaDetector = new UserAgentDetector(request);
		return mapping.findForward(uaDetector.composeForward(".formulario_registro_usuarios"));
	}

	

}
